define(['hammer','zepto'], function() {
	var returnTop = $('.back-top');
	var scrollTops = $(window).scrollTop();
	$(window).scroll(function() {
		scrollTops = $(window).scrollTop();
		if(scrollTops <= 100) {
			returnTop.hide();
		} else {
			returnTop.show();
		}
	})
	var backTop = new Hammer(returnTop[0]);
	backTop.on('tap', function() {
		var aa = setInterval(function() {
			scrollTops = $(window).scrollTop();
			var speed = scrollTops / -4;
			scrollBy(0, Math.floor(speed));
			if(scrollTops === 0) {
				clearInterval(aa);
			}
		}, 30)
	});
})